import { OperateSchema } from '@components/schema/operate';
const map: { [k: string]: () => Promise<{ default: any }> } = {
  basicinfo: () => import('./basicInfo'), // 立案
  wenshudianziqianming: () => import('./docSignList'), // 文书电子签名
  dianzisongdadizhi: () => import('./electronicAddress'), // 电子送达地址
  dianzisongda: () => import('./electronicService'), // 电子送达
}

// const Approve = () => import('@components/Approve/ApprovePane')

export function getOperateComponent (data: OperateSchema) {
  const { key, flow_key: flowKey } = data
  // const specialList = ['zuting', 'qingqiubiangeng', 'fanqingqiu', 'fanqingqiubiangeng', 'jianmian', 'tuichuhuibi', 'yanchangshenxian', 'zhongzhi', 'zcybaochou', 'processer_reassign']
  // if (flowKey && !specialList.includes(flowKey)) {
  //   return Approve
  // }
  return map[key]
}

export default map
